/**
 * Created by litengfei on 2018/3/3.
 */
var User = require("User");
class Handler{
    constructor(){
        this.logicCom = null;//游戏组件
    }
    static  instance(){
        if(Handler.g == null)Handler.g = new Handler();
        return Handler.g;
    }
    handleinPos(data){
        //显示头像
        var srcPos = this.logicCom.getScreenPos(User.pos,data.pos);
        this.logicCom.showHead(data.playerId,srcPos,data.headimgurl,data.nickname);
    }
}
module.exports = Handler;

Handler.g = null;


Handler.service = {};
Handler.service.inPos = function (data,cb) {
    cc.log("收到服务器端消息:inPos");
    cc.log(data);
    Handler.instance().handleinPos(data);
}

